package com.atguigu.order.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

// 扫描 model 模块的包（替换为实际的实体类包路径）
//@OpenAPIDefinition(
//        info = @Info(title = "API 文档", version = "1.0"),
//        servers = {@Server(url = "com.atguigu.model.order.bean", description = "默认服务器")}
//)
@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("你的项目 API 文档")
                        .version("1.0")
                        .description("这是基于 SpringDoc 的 API 文档"));
    }
}
